package org.docmanagement.data;

public class File extends Element {

	private String path = null;
	private String file = null;
	private Category mainCategory = null;

	public File() {
		super();
	}

	public File(String pFile) {
		this();
		setFile(pFile);
	}

	public String getFilePath() {
		if (path.endsWith("/") || path.endsWith("\\")) {
			return path + file;
		}
		return path + '/' + file;
	}

	public String getPath() {
		return this.path;
	}

	public void setPath(String pPath) {
		this.path = pPath;
	}

	public String getFile() {
		return file;
	}

	public void setFile(String pFile) {
		this.file = pFile;
	}

	public char getType() {
		return FILE_TYPE;
	}

	public Category getMainCategory() {
		return mainCategory;
	}

	public void setMainCategory(Category pCategory) {
		this.mainCategory = pCategory;
	}
}
